<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>评论管理</title>
    <meta name="description" content="Administry - Admin Template by www.865171.cn"/>
    <meta name="keywords" content="Admin,Template"/>
    <!-- Favicons -->
    <?php include_once("common/admin_css_js_header.php");?>
    <script type="text/javascript">
        $(document).ready(function() {
            Administry.expandableRows();
        });

    </script>
</head>
<body>
<?php include_once("common/admin_header.php");?>
<!-- Header -->

<!-- End of Header -->
<!-- Page title -->
<div id="pagetitle">
    <div class="wrapper">
        <h1>新闻管理 &rarr; <span>评论列表</span></h1>
        <!-- Quick search box -->
        <form action="" method="get"><input class="" type="text" id="q" name="q"/></form>
    </div>
</div>
<!-- End of Page title -->

<!-- Page content -->
<div id="page">
    <!-- Wrapper -->
    <div class="wrapper">
        <!-- Left column/section -->
        <section class="column width6 first" style="width:990px;">

            <div id="tabs">
                <!--<ul>
                                <li><a class="corner-tl" href="#tabs-date">List by date</a></li>
                                <li><a class="corner-tr" href="#tabs-abc">List by alphabet</a></li>
                            </ul>-->
                <div id="tabs-date">
                    <div class="colgroup">
                        <div class="width3 column first">
                            <p>总记录数:<?php echo $view['pagination']['totalCount']; ?></p>
                        </div>
                        <div class="width3 column">
                            <p class="pagination ta-right">
                                <?php echo $view['pagination']['code']; ?>
                            </p>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                    <hr/>
                    <table class="stylized full">
                        <thead>
                        <tr>
                            <th>标题</th>
                            <th>内容</th>
                            <th>评论类型</th>
                            <th>目标</th>
                            <th>创建时间</th>
                            <th>作者</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php foreach ($view['pagination']['data'] as $value) { ?>
                        <tr>
                            <td><?php echo $value['title'] ?></td>
                            <td><?php echo $value['content'] ?></td>
                            <td><?php
                                $array = array("NEWS" => "新闻评论", "ACTIVITY" => '活动评论');
                                echo $array[$value['type']];
                                ?></td>
                            <td><?php $comment = $this->modules->Comment;
                                $comment->setOperatorId($value['operatorId']);
                                $comment->setType($value['type']);
                                $operator = $comment->getOperator();
                                echo $operator['title'];
                                ?></td>
                            <td><?php echo $value['createDate'] ?></td>
                            <td><?php echo $value['userName'] ?></td>
                            <td><a href="/index.php/Admin/comment?action=del&id=<?php echo $value['commentId'] ?>"
                                   class="btn-green">删除</a></td>
                        </tr>
                            <?php } ?>
                        </tbody>
                    </table>
                </div>
                <div class="colgroup">
                    <div class="width3 column first">
                        <p>总记录数:<?php echo $view['pagination']['totalCount']; ?></p>
                    </div>
                    <div class="width3 column">
                        <p class="pagination ta-right">
                            <?php echo $view['pagination']['code']; ?>
                        </p>
                    </div>
                </div>
                <div class="clearfix"></div>

            </div>

        </section>
        <!-- End of Left column/section -->

        <!-- Right column/section -->
        <!--<aside class="column width2">
            <form action="/Admin/newsType?action=save" id="editForm" style="display: none" name="form1" method="post">
                <input name="newsTypeId" value="1" id="editTypeId" type="hidden"/>

                <div class="content-box">
                    <header>
                        <h3>编辑类别</h3>
                    </header>

                    <section>

                        <p><input type="text" id="editTitle" name="title" value="" class="full" id="firstname"></p>

                        <p><input type="submit" value="保存" class="btn btn-green big"></p>


                    </section>

                </div>
            </form>
            <form action="/Admin/newsType?action=save" name="form1" method="post">
                <div class="content-box">
                    <header>
                        <h3>添加新的类别</h3>
                    </header>

                    <section>

                        <p><input type="text" name="title" value="" class="full" id="firstname"></p>

                        <p><input type="submit" value="保存" class="btn btn-green big"></p>


                    </section>

                </div>
            </form>
        </aside>-->
        <!-- End of Right column/section -->

    </div>
    <!-- End of Wrapper -->
</div>
<!-- End of Page content -->

<!-- Page footer -->
<script type="text/javascript">
    function edit(id, title) {
        $("#editForm").show();
        $("#editTypeId").val(id);
        $("#editTitle").val(title);
    }
</script>
<?php include_once("common/admin_footer.php");?>
</body>
</html>